#ifndef _I_PROTOCOL_H
#define _I_PROTOCOL_H
#include <Windows.h>


#define TIME_OUT 60*1000*2
#define ProtoVer 0x05
#define Rsv0 0x10
#define Rsv1 0x13


enum ProtocolSize
{
	HeaderSize = 8,
	VerifySize = 3,
};

enum ClntType 
{
	Cnt_Handle,
	Cnt_Log,
	Cnt_Heartbeat,
};

enum SrvType
{
	Srv_Handle,
	Srv_LogRet,
	Srv_Heartbeat,
};

namespace IProtocol
{
#pragma  pack (push,1) 
	typedef struct PROTOCOL_HEADER
	{
		BYTE version;
		BYTE cmd;
		BYTE rsv[2];
		DWORD dwDataSize;
	}*PPROTOCOL_HEADER;
	typedef struct VERIFY_HEADER
	{
		BYTE dwUserlen;
		BYTE dwPwdlen;
		BYTE dwMaclen;
	}*PVERIFY_HEADER;
#pragma pack(pop)   

}


#endif // !_I_PROTOCOL_H


